/*
 * OrderDetailAddressListItem.java
 * business
 *
 * Created by SunDing on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.content.Context;

import com.yidiandao.business.R;
import com.yidiandao.business.data.response.OrderDetailResponse;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.OrderDetailAddressHolder;
import com.yidiandao.business.utils.UIUtils;

/** 订单详情 */
public class OrderDetailAddressListItem
        extends DisplayListItem<OrderDetailAddressHolder, OrderDetailResponse.Data> {

    public OrderDetailAddressListItem(OrderDetailResponse.Data s) {
        super(s);
    }

    @Override
    public void onShow(Context context, OrderDetailAddressHolder holder) {
        //姓名
        holder.mTvName.setText(
                UIUtils.getString(R.string.order_detail_consign, data.getOrder().getConsignee()));
        //地址
        holder.mTvAddress.setText(data.getOrder().getAddress());
        //电话
        holder.mTvNumber.setText(data.getOrder().getTel());
    }

    @Override
    public String getDisplayItemTag() {
        return OrderDetailAddressListItem.class.getSimpleName();
    }

    @Override
    public Class<OrderDetailAddressHolder> getViewHolderClazz() {
        return OrderDetailAddressHolder.class;
    }
}
